package actions

public enum ActionType {
    CREATE("create"), UPDATE("update"), DELETE("delete"), CLICK("click"), SAVE("save"), CHECK("check");

    String label

    public ActionType(label) {
        this.label = label;
    }

    public static ActionType getEnumItem(String enumItem) {
        def values = ActionType.values()
        for (int i=0; i < values.size(); i++) {
            if (values.getAt(i).label.equalsIgnoreCase(enumItem)) {
                return values.getAt(i)
            }
        }
    }
}